/*
 * @Description: 虫情知识库管理
 */
import zhreq from "@/api/axios";
export default {
  /**
   * @description: 获取所有知识库数据列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   */
  getKnowledgeBaseList(params) {
    return zhreq.post("/v3/template/diseasesPestsInfo/queryPageByCondition", params);
  },
  /**
   * @description: 获取所有知识库评论数据列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   */
  getknowleBaseList(params) {
    return zhreq.post("/v3/template/knowledgeBaseComments/queryPageByCondition", params);
  },
  /**
   * @description: 批量添加知识库
   * @param {Object}  *
   */
  addKnowledgeBaselist(params) {
    return zhreq.post('/v3/template/diseasesPestsInfo/add', params);
  },
  /**
  * @description: 批量添加知识库
  * @param {Object}  *
  */
  addKnowledgelist(params) {
    return zhreq.post('/v3/template/knowledgeBaseComments/add', params);
  },
  SearchKnowledgelist(params) {
    return zhreq.get(`/v3/template/knowledgeBaseComments/queryChildListByNo?no=${params}`, params);
  },
  /**
   * @description: 批量删除知识库
   * @param {Object}  *
   */
  delKnowledgeBaselist(noList) {
    return zhreq.get('/v3/template/diseasesPestsInfo/delListByNo?noList=' + noList);
  },
  /**
   * @description: 修改知识库
   * @param {Object}  *
   */
  editKnowledgeBaselist(params) {
    return zhreq.post('/v3/template/diseasesPestsInfo/edit', params);
  },

  queryByNo(no) {
    return zhreq.get('/v3/template/diseasesPestsInfo/queryByNo?no=' + no);
  },

  // 上传视频
  // /v3/template/diseasesPestsInfo/uploadVideo
  // 获取视频
  getVideoUrl(name, type) {
    return zhreq.get('/v3/template/diseasesPestsInfo/video?name=' + name + '&type=' + type);
  },
  // 点赞文章
  likeArtical(params) {
    return zhreq.get(`/v3/template/diseasesPestsInfo/likeArticles?no=${params}`)
  },
  // 获取文章点阅读数
  getArticalReads(params) {
    return zhreq.get(`/v3/template/diseasesPestsInfo/readArticles?no=${params}`)
  }
};
